package com.beetl.demo.springbootbeetl.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import java.util.ArrayList;
import java.util.List;

@Controller
@RequestMapping("/home")
public class HelloBeetlController {
    private static Logger logger= LoggerFactory.getLogger(HelloBeetlController.class);
    @RequestMapping("/add")
    public ModelAndView add(){
        ModelAndView modelAndView=new ModelAndView();
        logger.info("add request");
        List list=new ArrayList();
        list.add("list1");
        list.add("list2");
        list.add("list3");
        modelAndView.addObject("email","modeae@163.com");
        modelAndView.addObject("list",list);
        modelAndView.setViewName("ab");
        return modelAndView;

    }
}
